<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <table>
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>颜色</th>
            </tr>
            <tr v-for="item, index in fruit" :key="item.id">
                <td>{{ index + 1 }}</td>
                <td>{{ item.name }}</td>
                <td>{{ item.color }}</td>
            </tr>
        </table>
    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                fruit: [
                    {id: 1, name: "苹果", color: "红色"},
                    {id: 2, name: "梨子", color: "黄色"},
                    {id: 3, name: "橘子", color: "橙色"},
                    {id: 4, name: "香蕉", color: "黄色"},
                    {id: 5, name: "蓝莓", color: "蓝色"},
                ]
            }
        })
    </script>
    <style>
        table {
            border-collapse: collapse;
        }
        td, th {
            border: 1px solid #ccc;
        }
    </style>
</body>
</html>